<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <%@ include file="/main/main_css.jsp" %>
    <%@ include file="/main/main_js.jsp" %>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>身份证</title>
  </head>
  
  <body>
    <!--  -->
    <div class="all-wrapper">
        <div class="row com-header text-center">
            <span>鹰潭市行政服务中心</span>
        </div>
        <div class="row main-content time-table">
        	<div class="row">
                <h1>事项列表</h1>
        	</div>
            <table class="table table-bordered time-table-com" style="border:1px solid #efefef;">
                <tbody>
                    <tr class="first">
                        <td style="width:10%;border-left: none;">
                            <span>事项名称</span>
                        </td>
                        <td style="width:10%">
                            <span>主办单位</span>
                        </td>
                        <td  style="width:10%">
                            <span>申请时间</span>
                        </td>
                        <td style="width:10%">
                            <span>办结时间</span>
                        </td>
                        <td style="width:10%">
                            <span>审核意见</span>
                        </td>
                        <td style="width:10%">
                            <span>办件状态</span>
                        </td>
                        <td style="width:10%">
                            <span>承诺办结时限</span>
                        </td>
                    </tr>
                    <c:forEach var="bussi" items="${BussinessList}">
                    	<tr>
	                        <td>${bussi.sxmc }</td>
	                        <td>${bussi.normacceptdepart }</td>
	                        <td>${bussi.desdate }</td>
	                        <td>${bussi.tbjdate }</td>
	                        <td>${bussi.shyj }</td>
	                        <td>
	                        <c:if test="${bussi.process_state eq '0' }">
	                        	暂存
	                        </c:if>
	                        <c:if test="${bussi.process_state eq '1' }">
	                        	待审核
	                        </c:if>
	                        <c:if test="${bussi.process_state eq '2' }">
	                        	已受理
	                        </c:if>
	                        <c:if test="${bussi.process_state eq '3' }">
	                        	已完结
	                        </c:if>
	                        </td>
	                        <td>${bussi.cnbjsx }</td>
	                    </tr>
                    </c:forEach>
                </tbody>
            </table>
            <!-- 分页form -->
            <form id="pageForm" action="MyBussinessController/queryBussinessList" method="post">
            	<input type="hidden" id="state" name="state" value="${bussiness.state }"/>
            	<input type="hidden" id="itemName" name="itemName" value="${bussiness.itemName }"/>
            	<input type="hidden" id="currentpage" name="currentpage"/>
		    	<input type="hidden" id="prokeyid" name="prokeyid" value="${bussiness.prokeyid }">
            </form>
            <div class="row">
                <div class="col-md-24">
                    <div class="pull-right">
	                    <c:if test="${bussiness.getCurrentpage() > 1 }">
	                    	<button class="btn btn-lg btn-warning" type="button" onclick="nextPage(${bussiness.getCurrentpage()-1 })">上一页</button>
	                    </c:if>
	                    <c:if test="${bussiness.getCurrentpage() <= 1 }">
	                    	<button class="btn btn-lg btn-warning" type="button">上一页</button>
	                    </c:if>
	                    <span class="txt-md">${bussiness.getCurrentpage() }/${bussiness.getCurrentRows() }</span>
	                    <c:if test="${bussiness.getCurrentpage() < bussiness.getCurrentRows() }">
	                    	<button class="btn btn-lg btn-warning" type="button" onclick="nextPage(${bussiness.getCurrentpage()+1 })">下一页</button>
	                    </c:if>
	                    <c:if test="${bussiness.getCurrentpage() >= bussiness.getCurrentRows() }">
	                    	<button class="btn btn-lg btn-warning" type="button">下一页</button>
	                    </c:if>
                    </div>
                </div>
            </div>
        </div>
        <div class="row footer">
            <a class="btn btn-success btn-lg" href="loginOut" role="button"><i class="fa fa-reply"></i>返回首页</a>
        </div>
    </div>
    <script>
    	//分页
    	function nextPage(currentPage){
    		$("#currentpage").val(currentPage);
    		$("#pageForm").submit();
    		var index = layer.load(3, {
    		    shade: [0.3,'#000'] //0.1透明度的白色背景  
    			});
    			setTimeout(function(){
    			    layer.close(index);
    		},2000);
    	}
    	var winH = $(document).height();
        var mainH = winH -160;
        $('.main-content').height(mainH);
    </script>
</body>
</html>
